package com.jycrm.presentation.pages.main;

import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.event.PageRenderListener;
import com.jycrm.presentation.core.JyBasePage;


public abstract class Main extends JyBasePage implements PageRenderListener {

	public abstract String getRightUrl();
    public abstract void setRightUrl(String rightUrl);

	public void pageBeginRender(PageEvent e) {
		
		if(!e.getRequestCycle().isRewinding()) {
			Object str[] = e.getRequestCycle().getServiceParameters();
			System.out.println("str=="+str[0]);
			if(str != null) {
				if(str.length == 1) {
					if(str[0] instanceof String) {
						
						//if(str[0].equals("fromLogin")) {
							Main mainPage = (Main)e.getRequestCycle().getPage("Main");
							mainPage.setRightUrl("app?service=page/CustList");
						//}
					}
				}
			}	
		}	
	}
	

	 
}
